<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp"%>
<div id="printDiv" class="well form-inline">
	<input type="hidden" name="id" value="${order.id}" />
	<table class="table table-striped table-bordered table-condensed">
		<thead>
			<i class="icon-flag"></i>
			<strong>订单详情</strong>
		</thead>
		<tr>
			<td class="span2">订单编号:</td>
			<td>
				<span class="tBlue">${order.code}</span>
			</td>
		</tr>
		<tr>
			<td>发货部门:</td>
			<td>
				<span class="tBlue">${order.departmentTarget.name}</span>
			</td>
		</tr>
		<tr>
			<td>品牌:</td>
			<td>
				<span class="tBlue">${order.marchandise.brand.name}</span>
			</td>
		</tr>
		<tr>
			<td>商品:</td>
			<td>
				<span class="tBlue">${order.marchandise.name}</span>
			</td>
		</tr>
		<tr>
			<td valign="top">商品详情:</td>
			<td>
				<div id="m${order.marchandise.id }">
					<span>商品名称：${order.marchandise.name }</span>
					<br />
					<span>商品编号：${order.marchandise.code }</span>
					<br />
					<span>
						单价：
						<span mprice="mPrice">${order.marchandise.price }</span>
						元
					</span>
					<br />
					<span>商品条码：${order.marchandise.barCode }</span>
					<br />
					<span>品牌：${order.marchandise.brand.name }</span>
					<br />
					<span>产地：${order.marchandise.producePlace }</span>
					<br />
					<span>
						生产日期：
						<fmt:formatDate value="${order.marchandise.produceDate }" pattern="yyyy-MM-dd HH:mm:ss" />
					</span>
					<br />
					<span>保质期：${order.marchandise.shelflife }月</span>
					<br />
					<span>商品描述：${order.marchandise.description }</span>
				</div>
			</td>
		</tr>
		<tr>
			<td>单价:</td>
			<td>
				<span class="tBlue">
					￥
					<span id="mPrice" class="tRed">${order.marchandise.price}</span>
					元
				</span>
			</td>
		</tr>
		<tr>
			<td class="span2">订单名称:</td>
			<td>${order.name}</td>
		</tr>
		<tr>
			<td>订购数量:</td>
			<td>
				<span class="tRed">${order.goodsNumber} </span>
				(件)
			</td>
		</tr>
		<tr>
			<td>总价:</td>
			<td>
				<span class="tRed">
					<fmt:formatNumber pattern="###,###.##" value="${order.totalCost}"></fmt:formatNumber>
				</span>
				(元)
			</td>
		</tr>
		<tr>
			<td>订单受理人:</td>
			<td>
				<span>${order.orderChargeUser}</span>
			</td>
		</tr>
		<tr>
			<td>受理时间:</td>
			<td>
				<span class="tBlue">
					<fmt:formatDate value="${order.receivedTime}" pattern="yyyy-MM-dd HH:mm:ss" />
				</span>
			</td>
		</tr>
		<tr>
			<td>订单处理备注:</td>
			<td>${order.memo2}</td>
		</tr>
		<tr>
			<td>下单时间:</td>
			<td>
				<span class="tBlue">
					<fmt:formatDate value="${order.orderCreateTime}" pattern="yyyy-MM-dd HH:mm:ss" />
				</span>
			</td>
		</tr>
		<tr>
			<td>状态:</td>
			<td class="tRed">${order.status.value}</td>
		</tr>
		<tr>
			<td>收货部门:</td>
			<td>
				<span class="tBlue">${order.department.name}</span>
			</td>
		</tr>
		<tr>
			<td>联系人:</td>
			<td>${order.createUser}</td>
		</tr>
		<tr>
			<td>联系电话:</td>
			<td>${order.phone}</td>
		</tr>
		<tr>
			<td>订单备注:</td>
			<td>${order.memo}</td>
		</tr>
		<tr>
			<td>出库时间:</td>
			<td>
				<fmt:formatDate value="${order.outTime}" pattern="yyyy-MM-dd HH:mm:ss" />
			</td>
		</tr>
		<tr>
			<td>出库操作员:</td>
			<td>${order.outUser}</td>
		</tr>
		<tr>
			<td>出库备注:</td>
			<td>${order.memo3}</td>
		</tr>
	</table>
</div>
<table class="table table-striped table-bordered table-condensed">
	<tr>
		<td align="center">
			<input class="btn span btn-primary" id="printBtn" type="button" value="打印订单" />
			&nbsp;
			<input class="btn span1 btn-info" type="button" value="返 回" back="back" />
		</td>
	</tr>
</table>
<script src="${ctx}/resources/js/jquery.PrintArea.js" type="text/javascript"></script>
<script>
	$(function() {
		$("#printBtn").click(function() {
			$("#printDiv").printArea();
		});
	});
</script>